home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: gettimeofday() makes me mad !
- Date: 1 Mar 96 11:47:09 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.825680829@rscernix>
- References: <208_9602292012@dudd.uniserve.com>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <208_9602292012@dudd.uniserve.com> Carl@dudd.uniserve.com (Carl) writes:
-
- >What about if you use a function similar to the Borland clock_t() which
- >returns the amount of clock ticks since program start.
-
- The name is clock() and the function is _useless_ to keep track of real
- time in a multitasking environment. BTW, clock() is a standard C function,
- it has nothing to do with Borland.
-
- >Don't clock ticks
- >happen like 18 times per second on most systems?
-
- It depends on your definition of "most". If you count all the MSDOS and
- Windows boxes, they do represent most of the computers in current use.
- If you count operating systems, which is a more reasonable thing,
- most of them don't use a 55 ms real time clock. Even when running on
- PC hardware (on my Linux box, clock ticks happen 100 times per second).
-
- Anyway, the question is moot, because you have to use the CLOCKS_PER_SEC
- macro to convert the value returned by clock() into seconds.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-